import request from "@/service/request.ts";

/**
 * 查询数据
 */
export const getMarkerData = () => {
  return request.get("/markerData");
};

/**
 * 新增数据
 * @param data
 */
export const addMarkerData = (data: any) => {
  return request.post("/markerData", data);
};

/**
 * 更新坐标
 * @param id
 * @param obj
 */
export const updateMarkerData = (id: string, obj: MarkerDataType) => {
  return request.patch(`/markerData/${id}`, obj);
};

/**
 * 删除
 * @param id
 */
export const deleteMarkerData = (id: string | null) => {
  return request.delete(`/markerData/${id}`);
};

interface MarkerDataType {
  name?: string | number;
  coordinate?: string;
  camera?: string;
}
